package com.yxinsur.imc.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yxinsur.imc.business.domain.ImcOrderPersonEndorse;
import com.yxinsur.imc.business.vo.OrderPersonEndorseVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 保单人员批单Mapper接口
 *
 * @author imc
 * @date 2021-10-09
 */
@Mapper
public interface ImcOrderPersonEndorseMapper extends BaseMapper<ImcOrderPersonEndorse> {
    /**
     * 查询保单人员批单
     *
     * @param id 保单人员批单ID
     * @return 保单人员批单
     */
    ImcOrderPersonEndorse selectImcOrderPersonEndorseById(String id);

    /**
     * 查询保单人员批单列表
     *
     * @param imcOrderPersonEndorse 保单人员批单
     * @return 保单人员批单集合
     */
    List<ImcOrderPersonEndorse> selectImcOrderPersonEndorseList(ImcOrderPersonEndorse imcOrderPersonEndorse);

    /**
     * 新增保单人员批单
     *
     * @param imcOrderPersonEndorse 保单人员批单
     * @return 结果
     */
    int insertImcOrderPersonEndorse(ImcOrderPersonEndorse imcOrderPersonEndorse);

    /**
     * 逻辑删除保单人员批单
     *
     * @param imcOrderPersonEndorse 保单人员批单
     * @return 结果
     */
    int deleteImcOrderPersonEndorseById(ImcOrderPersonEndorse imcOrderPersonEndorse);

    /**
     * 批量删除保单人员批单
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    int deleteImcOrderPersonEndorseByIds(String[] ids);

    /**
     * 根据{保单ID}查询批单流水号
     *
     * @param orderId 保单ID
     * @return 批单流水号
     */
    String getSerialIdByOrderId(@Param("orderId") Long orderId);

    /**
     * 根据{保单ID}查询保单人员批单
     *
     * @param orderId         保单ID
     * @param tenantId        租户ID
     * @param orderPersonType 人员类型
     * @return List<OrderPersonEndorseVo>
     */
    List<OrderPersonEndorseVo> listOrderPersonEndorseVoByOrderId(@Param("orderId") long orderId, @Param("tenantId") long tenantId, @Param("orderPersonType") String orderPersonType);

    /**
     * 根据{保单ID}查询保单人员批单
     *
     * @param orderId 保单ID
     * @return List<OrderPersonEndorseVo>
     */
    List<ImcOrderPersonEndorse> listOrderPersonEndorseByOrderId(@Param("orderId") Long orderId);
}
